package com.epfly.base.vo;

import lombok.Data;

import java.util.List;


@Data
public class PageResp<T> extends BaseResp {

    /**
     * 当前页
     */
    private int pageNum;

    /**
     * 页面大小
     */
    private int pageSize;
    /**
     * 总条数
     */
    private long totalCount;

    /**
     * 总页数
     */
    private int totalPage;


    /**
     * 数据
     */
    private List<T> data;

    public PageResp() {

    }

    public PageResp(int pageNum, int pageSize, long totalCount, int totalPage, List<T> list) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.totalCount = totalCount;
        this.totalPage = totalPage;
        this.data = list;
    }

    public PageResp(int pageNum, int pageSize, long totalCount, int totalPage) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.totalCount = totalCount;
        this.totalPage = totalPage;
    }
}
